package org.example;

import org.example.config.RpcConfig;
import org.example.proxy.MockServiceProxyFactory;
import org.example.service.UserService;
import org.example.utils.ConfigUtils;

public class ConsumerExample {
    public static void main(String[] args) {
        RpcConfig rpc = ConfigUtils.loadConfig(RpcConfig.class, "rpc");
        System.out.println(rpc);
        /**
         * 测试mock代理服务
         */
        UserService userService = MockServiceProxyFactory.getProxy(UserService.class);
        int number = userService.getNumber();
        System.out.println(number);
    }
}
